﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;

namespace ExcellentCRM.DataService.Models
{
    /// <summary>
    /// 付费信息
    /// </summary>
    public class CostInfo : BaseModel
    {
        public float? Sum { get; set; }

        /// <summary>
        /// 缴费日期
        /// </summary>
        [DataType(DataType.DateTime)]
        public DateTime? DateOfPay { get; set; }

        /// <summary>
        /// 发票抬头
        /// </summary>
        [StringLength(100)]
        public string InvoiceTitle { get; set; }

        /// <summary>
        /// 开票日期
        /// </summary>
        public DateTime? DateOfReceipt { get; set; }

        /// <summary>
        /// 到期时间
        /// </summary>
        public DateTime? ExpDate { get; set; }

        /// <summary>
        /// 发票号
        /// </summary>
        [StringLength(50)]
        public string InvoiceNumber { get; set; }

        /// <summary>
        /// 汇款人名称
        /// </summary>
        [StringLength(30)]
        public string RemitterName { get; set; }

        /// <summary>
        /// 收款账户
        /// </summary>
        [StringLength(50)]
        public string ReceivableAcct { get; set; }

        /// <summary>
        /// 收款方式
        /// </summary>
        [StringLength(50)]
        public string ReceivableType { get; set; }

        /// <summary>
        /// 是否已开票
        /// </summary>
        public bool? IsReceipted { get; set; }

        [StringLength(500)]
        public string InvoiceComment { get; set; }

        public PayStatusType PayStatus { get; set; }

        public virtual IList<StuCourse> StuCourses { get; set; }
    }

    public enum PayStatusType
    {
        /// <summary>
        /// 未付款
        /// </summary>
        NonPay = 0,
        /// <summary>
        /// 已付款未确认
        /// </summary>
        PaidAndUnConfirmed = 1,
        /// <summary>
        /// 已付款已确认
        /// </summary>
        PaidAndConfirmed = 2
    }
}